AdfUIComponents.createComponentClass("AdfRichCommandNavigationItem",{componentType:"oracle.adf.RichCommandNavigationItem",propertyKeys:[{name:"inlineStyle",type:"String"},{name:"styleClass",type:"String"},{name:"shortDesc",type:"String"},{name:"unsecure",type:"Object",secured:!0},{name:"visible",type:"Boolean","default":!0},{name:"useWindow",type:"Boolean","default":!1},{name:"windowModalityType",type:"String","default":"modeless"},{name:"windowEmbedStyle",type:"String","default":"window"},{name:"windowHeight", type:"Number"},{name:"windowWidth",type:"Number"},{name:"accessKey",type:"String"},{name:"destination",type:"String"},{name:"disabled",type:"Boolean","default":!1,secured:!0},{name:"icon",type:"String"},{name:"messageType",type:"String","default":"none"},{name:"partialSubmit",type:"Boolean","default":!1,secured:!0},{name:"selected",type:"Boolean","default":!1},{name:"showRequired",type:"Boolean","default":!1},{name:"targetFrame",type:"String"},{name:"text",type:"String"},{name:"visited",type:"Boolean", "default":!1},"itemListener",{name:"remove",type:"String","default":"inherit"}],eventNames:["item"],superclass:AdfUICommand}); AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlCommandNavigationItemPeer"); AdfDhtmlCommandNavigationItemPeer.InitSubclass=function(){AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.KEY_UP_EVENT_TYPE,AdfUIInputEvent.CLICK_EVENT_TYPE,AdfUIInputEvent.FOCUS_EVENT_TYPE,AdfUIInputEvent.BLUR_EVENT_TYPE);AdfRichUIPeer.addComponentPropertyChanges(this,AdfRichCommandNavigationItem.TEXT);AdfRichUIPeer.addComponentPropertyGetters(this,AdfRichCommandNavigationItem.TEXT);AdfAgent.AGENT.getCapabilities()[AdfAgent.CAP_TOUCH_SCREEN]==AdfAgent.CAP_TOUCH_SCREEN_NONE&&AdfRichUIPeer.addComponentEventHandlers(this, AdfUIInputEvent.MOUSE_IN_EVENT_TYPE);this._TAB_ANCHOR_ID="disclosureAnchor";this._REMOVE_ICON_ID="rmAbv";this._HIGHLIGHTED_STYLE_CLASS="p_AFHighlighted"};AdfDhtmlCommandNavigationItemPeer.prototype.InitDomElement=function(a,b){AdfDhtmlCommandNavigationItemPeer.superclass.InitDomElement.call(this,a,b)}; AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentKeyUp=function(a){var b=a.getNativeEvent(),d=a.getKeyCode();b.ctrlKey&&(b.altKey&&d==AdfKeyStroke.F4_KEY)&&(b=this.getComponent(),!b.getDisabled()&&this.canRemove()&&(this._saveAndRemoveCompressedLayout(),a=a.getNativeEventTarget(),AdfFocusUtils.focusNextTabStop(a,null,!0),AdfItemEvent.queueItemRemoveEvent(b)))}; AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentClick=function(a){var b=this.getComponent();if(a.getSource()==b)if(this._isDisabled())a.stopBubbling();else if(a.isLeftButtonPressed())if(this._isOnRemoveButton(a)){if(this.canRemove()){this._saveAndRemoveCompressedLayout();var d=a.getNativeEventTarget();AdfFocusUtils.focusNextTabStop(d,null,!0);AdfItemEvent.queueItemRemoveEvent(b)}}else{var e=AdfRichUIPeer.getDomElementForComponent(b),d=e.href;void 0==d&&(d=e.getAttribute("href"));var f= AdfAgent.AGENT.getDomDocument().location.href,g=f.indexOf("#"),f=-1==g?f:f.substring(0,g);d&&(-1==d.indexOf(f)||1=d.length)&&d[d.length-1]==AdfDhtmlCommandNavigationItemPeer._TAB_ANCHOR_ID&&(d=this.getDomElement(),b?AdfDomUtils.addCSSClassName(d,AdfDhtmlCommandNavigationItemPeer._HIGHLIGHTED_STYLE_CLASS):AdfDomUtils.removeCSSClassName(d,AdfDhtmlCommandNavigationItemPeer._HIGHLIGHTED_STYLE_CLASS)))}; AdfDhtmlCommandNavigationItemPeer.prototype.HandleComponentMouseOver=function(a){this._isDisabled()&&a.stopBubbling()};AdfDhtmlCommandNavigationItemPeer.prototype.GetInlineEditor=function(a){return AdfDhtmlNavigationItemTextEditor.getInlineEditor()};AdfDhtmlCommandNavigationItemPeer.prototype.ComponentTextChanged=function(a,b,d,e){return null!=e&&(b=AdfDhtmlCommandNavigationItemPeer.getInlineEditableTextElement(a,b))?AdfDomUtils.handleTextChangeWithAccessKey(a,b,d):!1}; AdfDhtmlCommandNavigationItemPeer.getInlineEditableTextElement=function(a,b){AdfAssert.assert(null!=a.getProperty("text"));var d=AdfDomUtils.getFirstDescendentElement(b,"a");d||"a"==AdfAgent.AGENT.getNodeName(b).toLowerCase()&&(d=b);if(d)if(AdfDomUtils.getFirstDescendentElement(d,"img")){if(d=AdfDomUtils.getLastChildElement(d),"SPAN"==d.tagName)return d}else return d;return null}; AdfDhtmlCommandNavigationItemPeer.prototype._isOnRemoveButton=function(a){var b=this.getComponent().getClientId(),b=AdfRichUIPeer.createSubId(b,AdfDhtmlCommandNavigationItemPeer._REMOVE_ICON_ID);a=a.getNativeEventTarget();return a.id==b?!0:a.parentNode.id==b}; AdfDhtmlCommandNavigationItemPeer.prototype.canRemove=function(){var a=this.getComponent();if(a.getRemove){var b=a.getRemove();if(b&&("no"==b||"disabled"==b))return!1}b=a.getParent();if(null==b.getItemRemoval)return!1;b=b.getItemRemoval();if(a.getDisabled()||null==b||"none"==b)return!1;if("all"==b)return!0;if("allExceptLast"==b)return a=a.getClientId(),a=AdfRichUIPeer.createSubId(a,AdfDhtmlCommandNavigationItemPeer._REMOVE_ICON_ID),null!=AdfAgent.getAgent().getElementById(a)}; AdfDhtmlCommandNavigationItemPeer.prototype._saveAndRemoveCompressedLayout=function(){var a=this.getComponent().getParent(),b=null!=a?a.getPeer():null;b&&(b.bind(a),b&&b.__saveAndRemoveCompressedLayout&&b.__saveAndRemoveCompressedLayout())};AdfDhtmlCommandNavigationItemPeer.prototype._isDisabled=function(){var a=this.getDomElement();return a.disabled||AdfDomUtils.containsCSSClassName(a,AdfRichUIPeer.DISABLED_STYLECLASS)}; AdfDhtmlCommandNavigationItemPeer.prototype.GetComponentText=function(a,b){"A"!=b.tagName&&(b=AdfDomUtils.getFirstDescendentElement(b,"a"));if(b){var d=AdfAgent.AGENT.getTextContent(b);return""==d?null:d}AdfAssert.assert(!1,"Unable to find the element containing the text")};AdfDhtmlCommandNavigationItemPeer.prototype.GetAccessibleName=function(){return this.getComponent().getText()}; AdfUIComponents.createComponentClass("AdfUINavigationPath",{componentType:"org.apache.myfaces.trinidad.NavigationPath",propertyKeys:["value"],namingContainer:!0,superclass:AdfUICollection}); AdfUIComponents.createComponentClass("AdfRichBreadCrumbs",{componentType:"oracle.adf.RichBreadCrumbs",propertyKeys:[{name:"orientation",type:"String","default":"horizontal"},{name:"inlineStyle",type:"String"},{name:"styleClass",type:"String"},{name:"shortDesc",type:"String"},{name:"unsecure",type:"Object",secured:!0},{name:"visible",type:"Boolean","default":!0}],namingContainer:!0,superclass:AdfUINavigationPath}); AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlBreadCrumbsPeer",!1);AdfDhtmlBreadCrumbsPeer.prototype.InitDomElement=function(a,b){AdfDhtmlBreadCrumbsPeer.superclass.InitDomElement.call(this,a,b);var d=a.getClientId(),d=AdfRichUIPeer.CreateSubId(d,"oc");this._overflowContents=AdfAgent.AGENT.getElementById(d);AdfPage.PAGE.__registerDescendantResizeNotifyComponent(a)};AdfDhtmlBreadCrumbsPeer.prototype.needsResizeNotify=function(a){return!0}; AdfDhtmlBreadCrumbsPeer.prototype.ResizeNotify=function(a,b,d,e){a=this.getComponent();this.getDomElement();if(!this._overflowSupport){a=a.getClientId();if(!AdfOverflowSupport.needsOverflow(a))return;this._overflowSupport=new AdfOverflowSupport(a,this,"start","before");a=this._overflowContents.childNodes;for(b=0;d=a[b++];)1==d.nodeType&&("a"==d.tagName.toLowerCase()||0d?(this._addSeparators(a,b,!0),this._overflowSupport.addElement(e)):(this._overflowSupport.addElement(e),this._addSeparators(a,b,!1)),e=this._createBarOverflowElement(e),this._overflowSupport.addOverflowElement(e)}this._overflowSupport.handleResize()}}; AdfDhtmlNavigationPanePeer.prototype._updateOverflow=function(a){var b=this._getChildElements(this._headerDiv.id,this._headerContentDiv);0!=b.length&&this._resizeOverflow(this._headerDiv.id,b,a)};AdfDhtmlNavigationPanePeer.prototype._resizeTabHeader=function(a,b){var d=this._getChildElements(this._headerDiv.id,this._headerContentDiv);0!=d.length&&this._layoutTabs(a,this._headerDiv.offsetWidth,this._headerDiv.id,d)}; AdfDhtmlNavigationPanePeer.prototype._layoutTabs=function(a,b,d,e,f){a=e.length;var g=this.getComponent();this._maxTabSize||(this._maxTabSize=g.getMaxTabSize(),this._maxTabSize=null==this._maxTabSize||"infinity"==this._maxTabSize?0:parseFloat(this._maxTabSize));this._minTabSize||(this._minTabSize=g.getMinTabSize(),this._minTabSize=parseFloat(this._minTabSize),null==this._minTabSize&&(this._minTabSize=32));if(0this._maxTabSize)AdfLogger.LOGGER.warning("Minimum tab width should not be greater than maximum tab width: min\x3d"+ this._minTabSize+", max\x3d "+this._maxTabSize);else{if(!this._overflowLimit){this._overflowLimit=this._minTabSize*a;!this._tabOverlapWidth&&1this._maxTabSize&&(g=this._maxTabSize);tabContentElement.offsetWidth>g&&(h.style.display= "inline",tabContentElement.style.overflow="hidden",g-=h.offsetWidth);tabContentElement.style.width=g+"px";!e&&k!=tabContentElement.style.width&&(e=!0)}return e};AdfDhtmlNavigationPanePeer.prototype._hideOverflow=function(){"conveyorBelt"==AdfDhtmlNavigationPanePeer._compressedLayoutMode?this._conveyorBeltSupport&&this._conveyorBeltSupport.handleResize():this._overflowSupport&&this._overflowSupport.removeAllItemsFromOverflow()}; AdfDhtmlNavigationPanePeer.prototype._resizeOverflow=function(a,b,d){var e=AdfDhtmlNavigationPanePeer._compressedLayoutMode;"overflow"==e?(this._overflowSupport||(this._overflowSupport=this._getTabOverflowSupport(a,b,"after")),this._overflowSupport&&this._overflowSupport.handleResize()):"overflow-droplist"==e?(this._overflowSupport||(this._overflowSupport=this._getTabOverflowDroplistSupport(a,b,"after")),this._overflowSupport&&this._overflowSupport.handleResize()):"conveyorBelt"==e&&(this._conveyorBeltSupport|| (this._conveyorBeltSupport=this._getTabConveyorBeltSupport(a,b,d)),this._conveyorBeltSupport&&this._conveyorBeltSupport.handleResize())};AdfDhtmlNavigationPanePeer.prototype._getChildElements=function(a,b){for(var d=b.childNodes,e=[],f="conveyorBelt"==AdfDhtmlNavigationPanePeer._compressedLayoutMode,g=f?AdfRichUIPeer.CreateSubId(a,"cbs"):null,h=0;ha?(d.handleResize(),f&&this._readjustTabs(b,e)):d.handleResize();AdfDomUtils.setScrollTop(g,0)};AdfDhtmlNavigationPanePeer.prototype.__saveAndRemoveCompressedLayout=function(){var a=this._conveyorBeltSupport;a&&(AdfDhtmlNavigationPanePeer._conveyorBeltFirstItem=a.getFirstItemDisplayed());this._removeCompressedLayoutSupport()}; AdfDhtmlNavigationPanePeer.prototype._isLayoutCompressed=function(a){var b=AdfDhtmlNavigationPanePeer._compressedLayoutMode;return("overflow"==b||"overflow-droplist"==b)&&!this._overflowSupport&&!AdfOverflowSupport.needsOverflow(a)||"conveyorBelt"==b&&!this._conveyorBeltSupport&&!AdfConveyorBeltSupport.shouldUseConveyorBelt(a)?!1:!0}; AdfDhtmlNavigationPanePeer.prototype._getTabOverflowSupport=function(a,b){for(var d=new AdfOverflowSupport(a,this,"both"),e=0;e=a.length||a[a.length-1]!=AdfDhtmlNavigationPanePeer._ANCHOR_SUB_ID?!1:!0}; AdfDhtmlNavigationPanePeer.prototype.HandleComponentMouseDown=function(a){var b=a.getNativeEvent();a=a.getSource();var b=AdfAgent.AGENT.getEventTarget(b),d=this._getChoiceDropDownElement(a);if(b==d||b.parentNode==d)this.isPopupVisible(a,AdfDhtmlNavigationPanePeer._POPUP_PANEL_ID)?(b=AdfRichUIPeer.CreateSubId(a.getClientId(),AdfDhtmlNavigationPanePeer._CHOICE_BUTTON_ID),d=AdfPage.PAGE.getDocument().getElementById(b),d.setAttribute("aria-expanded","false"),this.hidePopup(a,AdfDhtmlNavigationPanePeer._POPUP_PANEL_ID)): this._showChoicePopupPanel(a)};AdfDhtmlNavigationPanePeer.prototype.HandleComponentMouseOver=function(a){if(this.isPopupVisible(this.getComponent(),AdfDhtmlNavigationPanePeer._POPUP_PANEL_ID)){var b=a.getNativeEventTarget();AdfFocusUtils.focusElement(b)}a.cancel()};AdfDhtmlNavigationPanePeer.prototype.HandleComponentKeyDown=function(a){var b=a.getNativeEvent(),b=AdfAgent.AGENT.getEventTarget(b),d=a.getSource();b==this._getChoiceDropDownElement(d)&&a.getKeyCode()==AdfKeyStroke.ENTER_KEY&&this._showChoicePopupPanel(d)}; AdfDhtmlNavigationPanePeer.prototype.GetPopupAlignmentNode=function(a,b){return this._getChoiceDropDownElement(a)};AdfDhtmlNavigationPanePeer.prototype.PopupClosed=function(a,b,d){d==AdfDhtmlNavigationPanePeer._POPUP_PANEL_ID&&(a=a.getClientId(),a=AdfRichUIPeer.CreateSubId(a,AdfDhtmlNavigationPanePeer._CHOICE_DATA_CONTAINER_ID),AdfAgent.AGENT.getElementById(a).appendChild(b))}; AdfDhtmlNavigationPanePeer.prototype._getChoiceDropDownElement=function(a){a=AdfRichUIPeer.CreateSubId(a.getClientId(),AdfDhtmlNavigationPanePeer._CHOICE_BUTTON_ID);return AdfAgent.AGENT.getElementById(a)}; AdfDhtmlNavigationPanePeer.prototype._showChoicePopupPanel=function(a){AdfObject.ensureClassInitialization(AdfRichPopup);var b=this._getPopupContentDom(a),d=AdfRichUIPeer.CreateSubId(a.getClientId(),AdfDhtmlNavigationPanePeer._CHOICE_BUTTON_ID);b.parentNode.removeChild(b);AdfPage.PAGE.getDocument().getElementById(d).setAttribute("aria-expanded","true");var e={};e[AdfDhtmlPopupHints.TYPE]=AdfDhtmlPopupHints.TYPE_MENU;e[AdfRichPopup.HINT_ALIGN]=AdfRichPopup.ALIGN_AFTER_START;e[AdfRichPopup.HINT_ALIGN_ID]= d;e[AdfDhtmlPopupHints.AUTODISMISS]=AdfDhtmlPopupHints.AUTODISMISS_MENU;this.showPopup(a,b,e,AdfDhtmlNavigationPanePeer._POPUP_PANEL_ID)};AdfDhtmlNavigationPanePeer.prototype._getPopupContentDom=function(a){a=AdfRichUIPeer.CreateSubId(a.getClientId(),AdfDhtmlNavigationPanePeer._POPUP_ID);return AdfAgent.AGENT.getElementById(a)}; AdfDhtmlNavigationPanePeer.prototype._createTabCompressedLayoutPopupElement=function(a){var b=AdfAgent.AGENT,d=AdfPage.PAGE.getLookAndFeel(),e=a.getAttribute("id"),f,g=a.getElementsByTagName("a")[0],h=a.getElementsByTagName("a")[1],k=a.getElementsByTagName("img")[0];k&&(k=k.cloneNode(!0),k.id&&(k.id+=AdfDhtmlNavigationPanePeer._TAB_ID_CONVEYOR_SUFFIX));if(g&&-1==g.className.indexOf("p_AFDisabled")){g=g.cloneNode(!0);g.id&&(g.id+=AdfDhtmlNavigationPanePeer._TAB_ID_CONVEYOR_SUFFIX);f=AdfDhtmlNavigationPanePeer._tabCompressedLayoutElementStyleClass; null==f&&(f="conveyorBelt"==AdfDhtmlNavigationPanePeer._compressedLayoutMode?d.getStyleClass("AFConveyorBeltElement"):d.getStyleClass("AFOverflowElement"),AdfDhtmlNavigationPanePeer._tabCompressedLayoutElementStyleClass=f);h&&(h=h.cloneNode(!0),h.id&&(h.id+=AdfDhtmlNavigationPanePeer._TAB_ID_CONVEYOR_SUFFIX),h.setAttribute("_componentId",e),d=this.createCallback(this._handleRemoveButtonClick),b.addBubbleEventListener(h,"click",d));var d=a.getAttribute("href"),l=b.getDomDocument().location.href;if(d&& -1==d.indexOf(l)){if(g.setAttribute("_href",d),k&&k.setAttribute("_href",d),e=a.getAttribute("target"))g.setAttribute("_target",e),k&&k.setAttribute("_target",e)}else g.setAttribute("_componentId",e),k&&k.setAttribute("_componentId",e);e=this.createCallback(this._handleNavItemClick);b.addBubbleEventListener(g,"click",e);k&&b.addBubbleEventListener(k,"click",e)}else f=g.innerHTML,g=a.ownerDocument.createElement("div"),g.innerHTML=f,f=AdfDhtmlNavigationPanePeer._tabCompressedLayoutElementDisabledStyleClass, null==f&&(f="conveyorBelt"==AdfDhtmlNavigationPanePeer._compressedLayoutMode?d.getStyleClass("AFConveyorBeltElementDisabled"):d.getStyleClass("AFOverflowElementDisabled"),AdfDhtmlNavigationPanePeer._tabCompressedLayoutElementDisabledStyleClass=f),h&&(h=h.cloneNode(!0),h.id&&(h.id+=AdfDhtmlNavigationPanePeer._TAB_ID_CONVEYOR_SUFFIX));b=a.ownerDocument.createElement("table");b.cellPadding=0;b.cellSpacing=0;b.style.width="100%";e=b.insertRow(-1);d=e.insertCell(-1);k&&d.appendChild(k);k=e.insertCell(-1); k.style.width="100%";d=a.ownerDocument.createElement("div");d.className=f;k.appendChild(d);d.appendChild(g);g=e.insertCell(-1);h&&(a=a.ownerDocument.createElement("div"),a.className=f,g.appendChild(a),a.appendChild(h));return b}; AdfDhtmlNavigationPanePeer.prototype._createBarOverflowElement=function(a){var b=this.getComponent(),d=AdfDhtmlNavigationPanePeer._barOverflowElementStyleClass;null==d&&(d=AdfPage.PAGE.getLookAndFeel().getStyleClass("AFOverflowElement"),AdfDhtmlNavigationPanePeer._barOverflowElementStyleClass=d);var e=a.ownerDocument.createElement("div");e.className=d;d=a.cloneNode(!0);d.removeAttribute("id");e.appendChild(d);b=AdfPage.PAGE.findComponent(a.id);if(!b.getDisabled()){b=a.href;void 0==b&&(b=a.getAttribute("href")); var f=AdfAgent.AGENT.getDomDocument().location.href;b&&-1==b.indexOf(f)?(d.setAttribute("_href",b),(a=a.getAttribute("target"))&&d.setAttribute("_target",a)):d.setAttribute("_componentId",a.getAttribute("id"));a=this.createCallback(this._handleNavItemClick);AdfAgent.AGENT.addBubbleEventListener(d,"click",a)}return e}; AdfDhtmlNavigationPanePeer.prototype._handleNavItemClick=function(a){this.hideAllPopups(this.getComponent());var b=AdfAgent.AGENT.getEventTarget(a);"A"!=b.nodeName&&"IMG"!=b.nodeName&&(b=b.parentNode);(a=b.getAttribute("_href"))?(b=b.getAttribute("_target"))?window.open(a,b):self.location=a:(this.__saveAndRemoveCompressedLayout(),a=b.getAttribute("_componentId"),a=AdfPage.PAGE.findComponent(a),AdfActionEvent.queue(a,a.getPartialSubmit()))}; AdfDhtmlNavigationPanePeer.prototype._handleRemoveButtonClick=function(a){a=AdfAgent.AGENT.getEventTarget(a);var b=a.getAttribute("_componentId");null==b&&(b=a.parentNode.getAttribute("_componentId"));a=AdfPage.PAGE.findComponent(b);b=a.getPeer();b.bind(a);b&&(b.canRemove&&b.canRemove())&&(this.hideAllPopups(this.getComponent()),this.__saveAndRemoveCompressedLayout(),AdfItemEvent.queueItemRemoveEvent(a))}; AdfDhtmlNavigationPanePeer.prototype._addSeparators=function(a,b,d){var e=b+1;d&&(e=b-1);b=!0;for(var f=a[e];b&&f;){if(1==f.nodeType)if("img"==f.tagName.toLowerCase()||0